﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="CQuery_ReportListaction.aspx.cs"
    Inherits="CQuery_ReportListaction" ValidateRequest="false" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>CQuery_ReportList</title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
    <ext:Panel ID="Panel1" runat="server" Layout="Fit" ShowBorder="False" ShowHeader="false"
        BodyPadding="5px" EnableBackgroundColor="true">
        <Toolbars>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
                    </ext:Button>
                    <ext:Button ID="btnSaveContinue" Text="保存" runat="server" Icon="SystemSaveNew" OnClick="btnSaveContinue_Click"
                        ValidateForms="SimpleForm1">
                    </ext:Button>
                    <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                    </ext:ToolbarFill>
                </Items>
            </ext:Toolbar>
        </Toolbars>
        <Items>
            <ext:Panel ID="Panel2" runat="server" EnableBackgroundColor="true" ShowBorder="false"
                ShowHeader="false" AutoScroll="true">
                <Items>
                    <ext:GroupPanel runat="server" BodyPadding="5px" AutoHeight="true" ID="GroupPanel1"
                        Title="简要说明" EnableCollapse="true" Collapsed="true" EnableBackgroundColor="true">
                        <Items>
                            <ext:Label runat="server" ID="lblshuoming" EncodeText="false">
                            </ext:Label>
                        </Items>
                    </ext:GroupPanel>
                    <ext:SimpleForm ID="SimpleForm1" runat="server" EnableBackgroundColor="true" ShowBorder="False"
                        ShowHeader="False" LabelAlign="Right">
                        <Items>
                            <ext:HiddenField runat="server" Required="true" ShowRedStar="true" Label="id" ID="txbid">
                            </ext:HiddenField>
                            <ext:HiddenField runat="server" ID="txbguid">
                            </ext:HiddenField>
                            <ext:DropDownList runat="server" ID="ddlconnId" Label="数据源">
                            </ext:DropDownList>
                            <ext:TextBox runat="server" Required="true" ShowRedStar="true" Label="报表名称" ID="txbreportName">
                            </ext:TextBox>
                            <ext:HtmlEditor runat="server" Label="简介" ID="txbshortView" Height="100px">
                            </ext:HtmlEditor>
                           
                            <ext:DropDownList runat="server" ID="ddlOrderColum" Label="唯一字段"  >
                                <ext:ListItem Value="Id" Text="Id" Selected="true" />
                            </ext:DropDownList>
                             <ext:DropDownList  runat="server" ID="ddlFormID" Label="反馈表单" >
                                <ext:ListItem Value="Empty" Text="无" Selected="true" />
                            </ext:DropDownList>
                             <ext:DropDownList  runat="server" ID="ddlLinkReportID" Label="关联表单" >
                                <ext:ListItem Value="Empty" Text="无" Selected="true" />
                            </ext:DropDownList>
                            <ext:DropDownList runat="server" ID="ddlReplaceMode" Label="SQL语句模式">
                                <ext:ListItem Value="0" Text="非替换模式" Selected="true" />
                                <ext:ListItem Value="1" Text="替换模式" Selected="true" />
                            </ext:DropDownList>
                            <ext:TextArea runat="server" Required="true" ShowRedStar="true" Label="SQL语句" ID="txbsqlString"
                                AutoGrowHeight="true">
                            </ext:TextArea>
                            <ext:Button runat="server" ID="btnGeren" Text="生成列" OnClick="btnGeren_click">
                            </ext:Button>
                             
                        </Items>
                    </ext:SimpleForm>
                    <ext:Grid ID="Grid1" Title="字段列表" ShowBorder="true" ShowHeader="true" AutoHeight="true"
                        runat="server" EnableCheckBoxSelect="true" DataKeyNames="Id,ColumID" EnableRowNumber="True"
                        EnableTextSelection="true" ForceFitAllTime="true" OnRowDataBound="Grid1_RowDataBound">
                        <Columns>
                            <ext:BoundField DataField="Id"  Hidden="true"/>
                            <ext:BoundField DataField="ColumID" DataFormatString="{0}" ExpandUnusedSpace="True"
                                HeaderText="字段ID" Width="60px" />
                            <ext:TemplateField HeaderText="字段名称" Width="60px">
                                <ItemTemplate>
                                    <asp:TextBox ID="txbColumName" runat="server" Width="80%" TabIndex='<%# Container.DataItemIndex + 10 %>'
                                        Text='<%# Eval("ColumName") %>'></asp:TextBox>
                                </ItemTemplate>
                            </ext:TemplateField>
                            <ext:TemplateField Width="60px" HeaderText="查询类型">
                                <ItemTemplate>
                                    <asp:DropDownList ID="ddlQueryType" runat="server">
                                        <asp:ListItem Value="文本" Text="文本"></asp:ListItem>
                                        <asp:ListItem Value="数字" Text="数字"></asp:ListItem>
                                        <asp:ListItem Value="日期" Text="日期"></asp:ListItem>
                                        <asp:ListItem Value="下拉框" Text="下拉框"></asp:ListItem>
                                    </asp:DropDownList>
                                </ItemTemplate>
                            </ext:TemplateField>
                            <ext:TemplateField Width="30px" HeaderText="显示">
                                <ItemTemplate>
                                    <asp:CheckBoxList runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal"
                                        ID="cblIsShow">
                                        <asp:ListItem Text="" Value="1"></asp:ListItem>
                                    </asp:CheckBoxList>
                                </ItemTemplate>
                            </ext:TemplateField>
                            <ext:TemplateField Width="30px" HeaderText="查询">
                                <ItemTemplate>
                                    <asp:CheckBoxList runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal"
                                        ID="cblIsQuery">
                                        <asp:ListItem Text="" Value="1"></asp:ListItem>
                                    </asp:CheckBoxList>
                                </ItemTemplate>
                            </ext:TemplateField>
                            <ext:TemplateField HeaderText="排序" Width="30px">
                                <ItemTemplate>
                                    <asp:TextBox ID="txbPaixu" runat="server" Width="80%" TabIndex='<%# Container.DataItemIndex + 10 %>'
                                        Text='<%# Eval("Paixu") %>'></asp:TextBox>
                                </ItemTemplate>
                            </ext:TemplateField>
                            <ext:TemplateField HeaderText="默认值">
                                <ItemTemplate>
                                    <asp:TextBox ID="txbDefaultValue" runat="server" TabIndex='<%# Container.DataItemIndex + 10 %>'
                                        Text='<%# Eval("DefaultValue") %>'></asp:TextBox>
                                </ItemTemplate>
                            </ext:TemplateField>
                        </Columns>
                    </ext:Grid>
                </Items>
            </ext:Panel>
        </Items>
    </ext:Panel>
    </form>
</body>
</html>
